import java.util
import java.util.concurrent.Executors


import com.gizwits.util.UtilBits
import org.apache.commons.codec.binary.Base64
import org.bson.BsonDocument



val  payload="AAAAAyIAAJEEAAAAAAABAAAAJwAAABQAAAB7AAAAPwAAAAAAAABi"
val s= Base64.decodeBase64(payload)
println("byte length "+s.length)
println(s.toList)
val b= s.slice(15,19)
UtilBits.byte2Uint32(b)
UtilBits.byte2bool(s.slice(9,10))


val  json="""{"did": "ux95ZfenN5QDMXMSLEZdWP", "timestamp": 1409107047, "product_key": "5760dd8e0e4c11e4b6c400163e02392a", "mac": "--2642743592", "ip": "182.92.160.95", "type": "dev_online"}"""

BsonDocument.parse(json)
Executors




